package com.zsl.demo.controller;

import com.zsl.demo.util.RedisUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class TestController {

    @Autowired
    private RedisUtil redisUtil;

    @RequestMapping("/test")
    public String test() {

        String a = "aaa";
        redisUtil.setRedis("aa", a);
        return "1";
    }
}
